#define _CRT_SECURE_NO_WARNINGS 1
#include "mine_sweeper.h"

void menu(void)
{
	printf("------------------\n");
	printf("----  1.Play  ----\n");
	printf("----  0.Exit  ----\n");
	printf("------------------\n");
}

int main()
{
	int input;
	srand((unsigned int)time(NULL));
	do
	{
		menu();
		printf("Please input a selection:\n");
		scanf("%d", &input);
		switch (input)
		{
		case 1:
			game();
			break;
		case 0:
			printf("Exit success.\n");
			break;
		default:
			printf("Invalid selection!Please input again!\n");
			break;
		}
	} while (input);

	return 0;
}